Function isotope_parser::utils::line_comment[][src]

pub fn line_comment(input: &str) -> IResult<&str, &str>
Expand description

Parse a single line comment

Single-line comments begin with // and run to the end of the line, e.g.

// I'm a single line comment

Example

assert_eq!(
    line_comment("//line comment \n//hello"),
    Ok(("\n//hello", "line comment "))
);
assert_eq!(
    line_comment("// // nested\nhello"),
    Ok(("\nhello", " // nested"))
)